Skip to content

CmdPal: Stop dock window resizes from saving for normal window opens#46118

Open
michaeljolley wants to merge 5 commits intomicrosoft:mainfrom
michaeljolley:dev/mjolley/dock-size
Open

CmdPal: Stop dock window resizes from saving for normal window opens#46118
michaeljolley wants to merge 5 commits intomicrosoft:mainfrom
michaeljolley:dev/mjolley/dock-size

Conversation

@michaeljolley
Copy link
Contributor

@michaeljolley michaeljolley commented Mar 14, 2026

Currently, if you resize a window opened from the dock (i.e. performance monitor commands) then exit CmdPal, the resized "size" persists on normal hotkey opens. This change tells CmdPal to revert the size when opened and only save the size on normal window close.

Fixes #45591

@michaeljolley michaeljolley requested a review from niels9001 March 14, 2026 02:11
@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Mar 14, 2026
@github-actions

This comment has been minimized.

@niels9001 niels9001 added the 0.98 label Mar 14, 2026
@jiripolasek
Copy link
Collaborator

Fixes #45591, right?

@niels9001
Copy link
Collaborator

Fixes #45591, right?

It hopefully should, yeah.

Copy link
Collaborator

@jiripolasek jiripolasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be the annoying merge gnome, but that unconditional PositionCentered in the DismissMessage handler would introduce another issue.

@jiripolasek
Copy link
Collaborator

  • Closing the main window while displayed in dock can still persist the dock anchored position;
  • Escape key behavior -> Always hide => remembers dock anchored position after Esc;
  • RestoreWindowPosition in ShowPaletteAtMessage reads persisted settings, not the last state;

@michaeljolley
Copy link
Contributor Author

  • Closing the main window while displayed in dock can still persist the dock anchored position;
  • Escape key behavior -> Always hide => remembers dock anchored position after Esc;
  • RestoreWindowPosition in ShowPaletteAtMessage reads persisted settings, not the last state;

On the first two, I can't reproduce that. Here's me opening various things on the dock and closing with Esc then reopening with hotkey.

Recording.2026-03-16.114558.mp4

On RestoreWindowPosition, that would be the last time position was saved which would be the last time closed when not opened by the dock , correct?

…-fix

Fix saving wrong position on exit and after hiding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.98 Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CmdPal: Dock - steals the main window (when preferred summon position is Last position)

3 participants